# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: N30N <archlinux@alunamation.com>
# Contributor: linkmauve <linkmauve@linkmauve.fr>
# Contributor: mokkurkalve <xenofil@gmail.com>

pkgname=libkate
pkgver=0.4.1
pkgrel=7
pkgdesc="A karaoke and text codec for embedding in ogg"
url="https://wiki.xiph.org/OggKate"
license=('BSD')
arch=('x86_64')
depends=('libpng' 'libogg')
makedepends=('git')
source=("$pkgname::git+git://git.xiph.org/users/oggk/kate.git#tag=kate-${pkgver}"
        0001-Fix-automake-warnings.patch)
sha512sums=('SKIP'
            '525d120cddd040441859f2783e6e566da631ba304074bfa40a34399879fc3053577e8e71ef804168aeef519fac62e205829b50a61d770cddd46f7dbfba660842')

prepare() {
  cd ${pkgname}
  patch -Np1 -i ../0001-Fix-automake-warnings.patch
}

build() {
  cd ${pkgname}
  ./autogen.sh --prefix=/usr \
               --disable-static \
               --disable-doc
  make
}

package() {
  cd ${pkgname}
  make DESTDIR="${pkgdir}" install
  install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 COPYING
  rm "${pkgdir}/usr/share/man/man1/KateDJ.1"
}
